package com.lsq.tucao.user.response;

import lombok.Data;

@Data
public class JsonResult {
    /**
    * 登陆成功后返回给前端的token（JWT）
    */
    private String token;
    /**
     * 相关数据
     */
    private Object data;
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 相关信息
     */
    private String msg;

    public JsonResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public JsonResult(Object data, Integer code, String msg) {
        this.data = data;
        this.code = code;
        this.msg = msg;
    }

    public JsonResult(String token, Object data, Integer code, String msg) {
        this.token = token;
        this.data = data;
        this.code = code;
        this.msg = msg;
    }


}
